@extends('frontend/layouts/bootstrap')

@section('content')
<div>
    <span style="font-size: 31.5px;  line-height: 40px;  margin: 10px 0;  font-family: inherit;  font-weight: bold;  color: inherit;  text-rendering: optimizelegibility;  -webkit-margin-before: 0.83em;  -webkit-margin-after: 0.83em;  -webkit-margin-start: 0px;  -webkit-margin-end: 0px;"> Return recycle data import</span>
</div>

{{ Form::open(array('route' => 'car_balance.main.recycle_csv', 'files' => true)) }}

<table class="table table-bordered">
    <thead style="background-color: #f0f0f0;">
        <tr>
            <th title="Recycle Import">Recycle Return date</th>
            <th title="Recycle Import">Recycle Import</th>
            <th title="Recycle Import">Action</th>
        </tr>
    </thead>
    <tr>
        <td>
            <input class="datepicker input-medium" placeholder="Recycle Return date" title="Recycle Return date" name="recycle_return_date" id="recycle_return_date" type="text" value="">
        </td>
        <td>
            <div class="fileupload fileupload-new" data-provides="fileupload">
                <div id="recycle_upload" class="input-group">
                    <div class="form-control uneditable-input"><i class="icon-file fileupload-exists"></i>
                        <span class="fileupload-preview"></span>
                    </div>
                    <div class="input-group-btn">
                        <a class="btn btn-default btn-file">
                            <span class="fileupload-new">Select file</span>
                            <span class="fileupload-exists">Change</span>
                            <input type="file" name="recycle_upload" class="file-input"/></a>
                        <a href="#" class="btn btn-default fileupload-exists" data-dismiss="fileupload">Remove</a>
                    </div>
                </div>
            </div>
        </td>
        <td>
            <button type="reset" class="btn btn-medium btn-default">Reset</button>
            <button type="submit" class="btn btn-medium btn-success"><i class="icon-plus icon-white"></i> Импорт хийх</button>
        </td>
    </tr>
</table>

{{ Form::token() }}
{{ Form::close() }}

@foreach($success_car as $car => $key)
    @if ($key == 1)
        <span class="badge badge-success"><i class="icon icon-ok"></i></span> {{ $car }} </br>
    @else
        <span class="badge badge-important"><i class="icon icon-remove"></i></span> {{ $car }} --> <i class="icon icon-dollar"></i>{{ $key }}</br>
    @endif
@endforeach

@stop

@section('pagestyles')
<link rel="stylesheet" type="text/css" href={{ asset('assets/bootstrap-fileupload/fileupload.css') }} />
<link rel="stylesheet" type="text/css" href={{ asset('assets/bootstrap-datepicker/datepicker.css') }} />
@stop

@section('pagescripts')
<script type="text/javascript" src={{ asset('assets/bootstrap-fileupload/fileupload.js') }}></script>
<script type="text/javascript" src={{ asset('assets/bootstrap-datepicker/datepicker.js') }}></script>
<script type="text/javascript">
    $(function() {
        $( ".datepicker" ).datepicker({
            format: "yyyy-mm",
            viewMode: "months",
            minViewMode: "months",
            autoclose: true
        });
    });
</script>
@stop